/*
 * @Description: 
 * @Autor: 商晓彬
 * @Date: 2021-12-05 12:44:52
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-12-23 10:44:31
 */
import { AfterViewChecked, Component, ElementRef, EventEmitter, Injector, Input, Output, ViewChild } from '@angular/core';
import { AppComponentBase } from '@shared/common/app-component-base';
import { ModalDirective } from 'ngx-bootstrap';
import { MessageService } from '@abp/message/message.service';
import { finalize } from 'rxjs/operators';
import { Table } from 'primeng/components/table/table';
import { Paginator } from 'primeng/components/paginator/paginator';
import { LazyLoadEvent } from 'primeng/api';
import { SuiteInfoBoardServiceProxy } from '@shared/service-proxies/service-proxies';

@Component({
    selector: 'app-matching-inner',
    templateUrl: './matching-inner.component.html',
    styleUrls: ['./matching-inner.component.less']
})
export class MatchingInnerComponent extends AppComponentBase {
    //引入子组件
    @ViewChild('createOrEditModal') modal: ModalDirective;
    @Input() editData: any;  //行数据
    saving = false;
    rowData = [];
    model = undefined;
    sendTime = undefined;
    xjName = undefined;
    constructor(
        injector: Injector,
        private _messageService: MessageService,
        private _suiteInfoBoardServiceProxy: SuiteInfoBoardServiceProxy,
    ) {
        super(injector);
    }
    getTableList() {
        this._suiteInfoBoardServiceProxy.getPerSuiteInfo(
            this.editData.id,
        ).pipe(finalize(() => { }))
            .subscribe(result => {
                this.rowData = result.items;
            });
    }
    resert() {

    }
    ngOnInit() {
    }
    onShown(): void {
        this.getTableList();
    }
    show(): void {
        this.modal.show();
    }
    //关闭事件
    close(): void {
        this.rowData = [];
        this.modal.hide();
    }

}
